home *** CD-ROM | disk | FTP | other *** search
- Path: opera.iinet.net.au!news
- From: random@opera.iinet.net.au (Billy Shields)
- Newsgroups: comp.lang.c,iinet.general,comp.os.msdos.programmer,comp.os.msdos.misc,alt.msdos.programmer
- Subject: Re: Checking for floppy disk??
- Followup-To: comp.lang.c,iinet.general,comp.os.msdos.programmer,comp.os.msdos.misc,alt.msdos.programmer
- Date: 22 Feb 1996 17:21:57 +0800
- Organization: iiNet Technologies
- Message-ID: <4ghcjl$eed@opera.iinet.net.au>
- References: <4f9rdq$rnk@opera.iinet.net.au>
- NNTP-Posting-Host: localhost
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- I believe you have to disable the DOS Critical Error Handler
- (if I remember correctly). I think Turbo Debugger ignores the
- Critical Error Handler but running normally its quite active.
- Disabling it usually involves setting a new Interrupt Service
- Routine for it (I think its int 24h but double check that).
-
- Billy
-
- Marcus Schnell (marcus@opera.iinet.net.au) wrote:
- :
- : This piece of code is supposed to check if a floppy disk in
- : in drive A:
- :
- : void c_CheckPCMCIADevice(void) {
- : struct diskfree_t drive;
- :
- : while (_dos_getdiskfree(1, &drive)) {
- : printf("Try again...\n");
- : getc();
- : };
- : printf("OK, disk inserted.\n");
- : };
- :
- : If I run this program in the debugger (Turbo Debugger) it works fine,
- : ie. it goes into the loop and prompts me until I have inserted a
- : disk. If I run the program without the debugger, I get the DOS error
- : message:
- :
- : Not ready reading drive A:
- : Abort, Retry, Fail?
- :
- : Why does it behave differently in the debugger and how can I
- : disable the ugly DOS error message outside the debugger???
- : I am using Borland C++ 4.5, but my application is straight DOS
- : and only C, no C++.
- :
- : Thanks,
- : Marcus
- : marcus@iinet.com.au
-